import request from '@/utils/request'
// -----------------------------------用户背包 satrt---------------------------
// 获取列表数据
export function listData(data) {
  return request({
    url: '/userRucksack/listData',
    method: 'post',
    data
  })
}
// 放入饰品
export function addGoods(data) {
  return request({
    url: '/userRucksack/addGoods',
    method: 'post',
    data
  })
}
// 废除饰品
export function abolishGoods(data) {
  return request({
    url: '/userRucksack/abolishGoods',
    method: 'post',
    data
  })
}
// 废除饰品
export function initGoods(data) {
  return request({
    url: '/userRucksack/initGoods',
    method: 'post',
    data
  })
}
// 获取饰品来源
export function getOriginList() {
  return request({
    url: '/userRucksack/getOriginList',
    method: 'post'
  })
}
// 获取饰品状态
export function getGoodsStatus() {
  return request({
    url: '/userRucksack/getGoodsStatus',
    method: 'post'
  })
}
// 根据类型加载对应的箱子
export function getBoxListByOriginList(data) {
  return request({
    url: '/userRucksack/getBoxListByOriginList',
    method: 'post',
    data
  })
}

// -----------------------------------用户背包 end ---------------------------
// -----------------------------------背包提取 start ---------------------------
// 获取列表数据
export function getListData(data) {
  return request({
    url: '/userDraw/listData',
    method: 'post',
    data
  })
}
// 用户提取数据保存
export function save(data) {
  return request({
    url: '/userDraw/save',
    method: 'post',
    data
  })
}
// 提取限制保存
// {"priceLimit":"100","countLimit":"100"}
export function saveLimit(data) {
  return request({
    url: '/userDraw/saveLimit',
    method: 'post',
    data
  })
}
// 限制金额回显
export function getLimitValue() {
  return request({
    url: '/userDraw/getLimitValue',
    method: 'post'
  })
}
// 取消订单
export function cancel(data) {
  return request({
    url: '/userDraw/cancel',
    method: 'post',
    data
  })
}
// 重新购买
export function reDraw(data) {
  return request({
    url: '/userDraw/reDraw',
    method: 'post',
    data
  })
}
// 重新购买
export function customReDraw(data) {
  return request({
    url: '/userDraw/customReDraw',
    method: 'post',
    data
  })
}
// 重新购买
export function cancelBuy(data) {
  return request({
    url: '/userDraw/cancelBuy',
    method: 'post',
    data
  })
}
//
export function setDrawAdminLimit(data) {
  return request({
    url: '/userDraw/setDrawAdminLimit',
    method: 'post',
    data
  })
}
//
export function getDrawAdminLimit() {
  return request({
    url: '/userDraw/getDrawAdminLimit',
    method: 'post'
  })
}
//
export function checkCustomReDraw(data) {
  return request({
    url: '/userDraw/checkCustomReDraw',
    method: 'post',
    data
  })
}

export function updateToSuccess(data) {
  return request({
    url: '/userDraw/updateToSuccess',
    method: 'post',
    data
  })
}

// -----------------------------------背包提取 end ---------------------------

// -----------------------------------开箱记录 satrt ---------------------------
// 列表页加载数据
export function openCaseListData(data) {
  return request({
    url: '/boxOpenRecord/listData',
    method: 'post',
    data
  })
}
// 获取所有的开箱方式
export function getOpenWayList() {
  return request({
    url: '/box/getOpenWayList',
    method: 'post'
  })
}
// 获取所有的开箱玩法
export function getOpenTypeList() {
  return request({
    url: '/box/getOpenTypeList',
    method: 'post'
  })
}
// 根据类型加载对应的箱子
export function getBoxListByType(data) {
  return request({
    url: '/box/getBoxListByType',
    method: 'post',
    data
  })
}
// 根据类型加载对应的箱子
export function playOutGetBoxList(data) {
  return request({
    url: '/playOut/getBoxList',
    method: 'post',
    data
  })
}
// 合计
export function sumPrice(data) {
  return request({
    url: '/boxOpenRecord/sumPrice',
    method: 'post',
    data
  })
}
// 合计
export function playoutSumPrice(data) {
  return request({
    url: '/playOut/sumPrice',
    method: 'post',
    data
  })
}
// 合计
export function battleSumPrice(data) {
  return request({
    url: '/battle/sumPrice',
    method: 'post',
    data
  })
}
// 晶粹合计
export function ammoSumPrice(data) {
  return request({
    url: '/ammo/sumPrice',
    method: 'post',
    data
  })
}
// 玩家背包记录;
export function getOrnamentGlobalValue(data) {
  return request({
    url: '/userRucksack/getOrnamentGlobalValue',
    method: 'post',
    data
  })
}
// 积分抽奖记录;
export function taskSumPrice(data) {
  return request({
    url: '/task/sumPrice',
    method: 'post',
    data
  })
}
// 玩家汰换记录;
export function getStatistics(data) {
  return request({
    url: '/replace/getStatistics',
    method: 'post',
    data
  })
}
// -----------------------------------开箱记录 dend ---------------------------
// -----------------------------------消费记录 start ---------------------------
// 获取消费设置
export function getRechargeSetting() {
  return request({
    url: '/recharge/getRechargeSetting',
    method: 'post'
  })
}
// 保存消费设置
export function setRechargeSetting(data) {
  return request({
    url: '/recharge/setRechargeSetting',
    method: 'post',
    data
  })
}
// 获取消费设置下拉菜单
export function getRechargeList(data) {
  return request({
    url: '/recharge/getRechargeList',
    method: 'post',
    data
  })
}
// 列表页数据
export function getlistData(data) {
  return request({
    url: '/recharge/listData',
    method: 'post',
    data
  })
}
// 用户余额记录积分列表页数据
export function listUserBalanceData(data) {
  return request({
    url: '/recharge/listUserBalanceData',
    method: 'post',
    data
  })
}
// 用户余额记录晶粹列表页数据
export function ammoListChangeData(data) {
  return request({
    url: '/ammo/listChangeData',
    method: 'post',
    data
  })
}

// -----------------------------------消费记录 end ---------------------------
// -----------------------------------主播流水，玩家推广 start ---------------------------
// 主播流水列表页数据
export function listAnchorStreamData(data) {
  return request({
    url: '/extension/listAnchorStreamData',
    method: 'post',
    data
  })
}
// 主播流水列表页数据
export function listAnchorData(data) {
  return request({
    url: '/extension/listAnchorData',
    method: 'post',
    data
  })
}
// 推广消费列表页数据
export function listUserStreamData(data) {
  return request({
    url: '/extension/listUserStreamData',
    method: 'post',
    data
  })
}
// 玩家推广列表页数据
export function listUserData(data) {
  return request({
    url: '/extension/listUserData',
    method: 'post',
    data
  })
}
// 获取所有裂变箱子
export function getFissionBoxList() {
  return request({
    url: '/extension/getFissionBoxList',
    method: 'post'
  })
}
// 获取推广设置
export function getExtensionSetting() {
  return request({
    url: '/extension/getExtensionSetting',
    method: 'post'
  })
}
// 保存推广设置
export function setExtensionSetting(data) {
  return request({
    url: '/extension/setExtensionSetting',
    method: 'post',
    data
  })
}
// -----------------------------------主播流水，玩家推广 end ---------------------------

/** ******************催发货相关*************************/
// Zbt 错误信息
export function zbtBuyDetail(data) {
  return request({
    url: '/userDraw/zbtBuyDetail',
    method: 'post',
    data
  })
}
// 手动催发
export function remind(data) {
  return request({
    url: '/userDraw/remind/all/user',
    method: 'post',
    data
  })
}

// 获取自动发送催收短信开关
export function getRemindStatus() {
  return request({
    url: '/userDraw/get/remind',
    method: 'post'
  })
}

// 设置自动发送催收短信开关
export function setRemindStatus(data) {
  return request({
    url: '/userDraw/set/remind',
    method: 'post',
    data
  })
}
// -----------------------------------对战开箱记录 ---------------------------
// 设置自动发送催收短信开关
export function playOutListPlayOutData(data) {
  return request({
    url: '/playOut/ListPlayOutData',
    method: 'post',
    data
  })
}

export function confirmationRecord(params) {
  return request({
    url: '/cardProduct/confirmation-record',
    method: 'get',
    params: {
      ...params
    }
  })
}
// 重新确权
export function confirmCard(data) {
  return request({
    url: '/confirmCard',
    method: 'post',
    data
  })
}
// 积分余额变更
export function listUserBalanceDataSum(data) {
  return request({
    url: '/recharge/listUserBalanceDataSum',
    method: 'post',
    data
  })
}
// 晶粹余额变更
export function listChangeDataSum(data) {
  return request({
    url: '/ammo/listChangeDataSum',
    method: 'post',
    data
  })
}
// 设置自动发送催收短信开关
export function saveLimitUser(data) {
  return request({
    url: '/userDraw/saveLimitUser',
    method: 'post',
    data
  })
}

// 设置自动发送催收短信开关
export function getLimitUser() {
  return request({
    url: '/userDraw/getLimitUser',
    method: 'post'
  })
}

export function exportListData(data) {
  return request({
    url: '/userDraw/exportListData',
    method: 'post',
    data,
    responseType: 'blob',
  })
}
